package com.smartparking.repository;

import com.smartparking.entity.Vehicle;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author ganru
 * @date 2025/11/3 18:57
 */
@Repository
public interface VehicleRepository extends JpaRepository<Vehicle, Integer> {
    // 根据车牌号查找车辆
    Vehicle findByPlateNumber(String plateNumber);

    // 根据用户ID查找车辆
    List<Vehicle> findByUserUserId(Integer userId);
}